# -*- coding: utf-8 -*-
"""
@Time    : 2021/10/19 7:44
@Author  : Leibuyun
@File    : 6.2 读写JSON数据.py
"""

import json

data = {
    'name': 'ACME',
    'shares': 100,
    'price': 542.3
}

json_str = json.dumps(data)     # 将字典转化为json字符串
print(json_str)

